home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.20000824-20010305 / 000218_news@columbia.edu _Tue Jan 23 10:13:33 2001.msg < prev    next >
Internet Message Format  |  2001-03-05  |  3KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by fozimane.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id KAA08202
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Tue, 23 Jan 2001 10:13:33 -0500 (EST)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA04806
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 23 Jan 2001 10:13:32 -0500 (EST)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id KAA06385
  10.     for kermit.misc@watsun.cc.columbia.edu; Tue, 23 Jan 2001 10:03:26 -0500 (EST)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: fdc@columbia.edu (Frank da Cruz)
  13. Subject: Re: Unwanted blank space in filenames...
  14. Date: 23 Jan 2001 15:03:18 GMT
  15. Organization: Columbia University
  16. Message-ID: <94k6fm$671$1@newsmaster.cc.columbia.edu>
  17. To: kermit.misc@columbia.edu
  18.  
  19. In article <73sh49.9im.ln@gate.heywood.co.uk>,
  20. Lawry <nobody@nowhere.com> wrote:
  21. : I have a sort semi-automatic process for users to upload files from the PC's
  22. : to a Unix Server, and utilise Kermit (C-Kermit 6.0.192) underneath.
  23. : Basically I just have a system call in the program on unix to start
  24. : "kermit -r" and then allow the user to utilise the file transfer system of
  25. : the KEA 420 emulation software to transfer the file required.
  26. If you used Kermit 95:
  27.  
  28.   http://www.columbia.edu/kermit/k95.html
  29.  
  30. instead of Hyperterminal, you could have it convert the spaces to printable
  31. characters when sending.  The command is "set file names converted".
  32.  
  33. : My problem is that when a file on the PC has spaces within it, the file
  34. : arrives on Unix with spaces in the filename, and then the programs that
  35. : subsequently process these files cannot handle the files and crashes.
  36. : What I need to know is, is there an option I can use from the command line
  37. : (such that I can merely change the system call in the program on Unix to a
  38. : "kermit -r -whatever") that will strip blank space out of the file name so
  39. : that "My File.txt" on the PC would be "MyFile.txt" on Unix?
  40. Yes, but you'll need C-Kermit 7.0 for this:
  41.  
  42.   http://www.columbia.edu/kermit/ckermit.html
  43.  
  44. The command would be:
  45.  
  46.   kermit -r -a "\freplace(\v(filename),\32,_)"
  47.  
  48. -r means "receive" and -a specifies an "as-name", which in this case is a
  49. template, in which \v(filename) is replaced by the name of each file, and
  50. \freplace(string,\32,_) is a function that returns its argument with blanks
  51. (\32) replaced by underscore (_).  More about templates here:
  52.  
  53.   http://www.columbia.edu/kermit/ckermit2.html#x4.1
  54.  
  55. - Frank